<include file="header1" />
<body>
<div class="wraper">
	 <div class="load">
        <img class="load-bee" src="/assets/base/studentair/images/load-bee.png">

    </div>
	<div class="head clearfix">
		<a href="#" class="iconfont icon-zuo pull-left"></a>
		<span class="head-name pull-left">押金退还申请</span>
		<a href="/base/studentAir/backDesc" class="pull-right text-right small-text">退款说明</a>
	</div>
	<p class="form-list text-center">申请退还押金：<span class="price">{BEESCRM:$data['deposit']-$data['money']}</span>元</p>
	<p class="field">租赁内容</p>
	<div class="lists tb-mode">
		<div class="tb-cell user-info">
			<p>租赁期：<span class="price">{BEESCRM:$data.year}</span>年 <span class="price">[ {BEESCRM:$data.start_time|date="Y-m-d",###} 至 {BEESCRM:$data.endtime|date="Y-m-d",###} ]</span></p>
			<p>费用：{BEESCRM:$data.money}元/台</p>
			<p>押金：{BEESCRM:$data.deposit}元/台</p>
			<p>已支付：<span class="price">{BEESCRM:$data.order_price}</span>元</p>
			<p>期满无损坏可退款：{BEESCRM:$data['deposit']-$data['money']}元</p>
		</div>
	</div>
	<div class="lists tb-mode">
		<div class="tb-cell user-info">
			<p class="name">{BEESCRM:$data.username}&nbsp;&nbsp;&nbsp;&nbsp;<span class="text-gray">申请人</span></p>
			<p>学号：{BEESCRM:$data.student_num}</p>
			<p>学校：{BEESCRM:$data.school_name}</p>
			<p>宿舍：{BEESCRM:$data.community_name}{BEESCRM:$data.building_name}{BEESCRM:$data.room}</p>
			<p>手机：{BEESCRM:$data.mobile}</p>
		</div>
	</div>
	<p class="field">申请人室友</p>
	<div class="lists proposer third-lie">
		<div class="tb-mode ziduan">
			<p class="tb-cell first">姓名</p>
			<p class="tb-cell second">学号</p>
			<p class="tb-cell third">手机号</p>
		</div>
		<volist name="data.NewstudentAirorderJoin" id="vo">
			<div class="tb-mode">
				<p class="tb-cell first">{BEESCRM:$vo.username}</p>
				<p class="tb-cell second">{BEESCRM:$vo.student_num}</p>
				<p class="tb-cell third">{BEESCRM:$vo.mobile}</p>
			</div>
		</volist>
	</div>
	<p class="block-space text-center">退还押金申请需所有室友同意，方可前往领取.<br/>请于<span style="color: red;">{BEESCRM:$endtime|date="Y-m-d H:i",###}</span>前完成确认，超时需重新申请！</p>
	<div class="btn-box">
		<input type="hidden" value="{BEESCRM:$endtime}" id="endtime">
		<a href="javascript:void(0);" class="btn" id="sure" data-id="{BEESCRM:$order_id}">确认提交</a>
	</div>

	<div class="bottom-box">
		<p class="copyright">杭州青橄榄网络技术有限公司 技术支持</p>
	</div>

</div>
<div class="pop-box protocol">
	<p class="close"><span class="iconfont icon-guanbi"></span></p>
	<div class="text-main">
		<p>1. 申请发起后，需所有室友在有申请效期内确认同意，租赁申请视为发起成功，可进入付款，付款后安装人员上门安装。如有1位或以上室友不同意该申请，则租赁申请发起失败。</p>
		<p>2. 申请发起后，需所有室友在有申请效期内确认同意，租赁申请视为发起成功，可进入付款，付款后安装人员上门安装。如有1位或以上室友不同意该申请，则租赁申请发起失败。</p>
		<p>3. 申请发起后，需所有室友在有申请效期内确认同意，租赁申请视为发起成功，可进入付款，付款后安装人员上门安装。如有1位或以上室友不同意该申请，则租赁申</p>
	</div>
	<div class="btn-box">
		<a href="#" class="btn">返回</a>
	</div>
</div>
<include file="commonJs" />
<script>
	var height = $(window).height();
	var bottombox_height = $('.bottom-box').outerHeight();
	$('.wraper').css("minHeight",height);
	$('.wraper').css("paddingBottom",bottombox_height);
	$('.text-main').css("height",height*0.6);

	$(window).load(function(){
		$('.load').hide();
	})
	$(function(){
		$('.xieyi').click(function(){
			$(this).find('.iconfont').toggleClass('icon-xuanzedianjihou');
		})
	})

	$('#sure').on('click',function(){
		var order_id = $(this).data('id');
		var endtime = $('#endtime').val();
		$.ajax({
			'url': "/base/studentAir/order/wechat_id/{BEESCRM:$wechat_id}",
			'data': {flag:1,order_id:order_id,endtime:endtime},
			'dataType':'json',
			'type': 'POST',
			'async': false,
			success: function(data) {
				if (data.status == 'S') { //添加成功
					window.location.href = data.url;
				}else{
					$.alert('error',data.message);
					return false;
				}
			}
		});
	});
</script>
</body>
</html>
